<template>
	<view class="subscribe_container">
		<web-view :src="webUrl" @message="handleMessage"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				webUrl: ''
			}
		},
		onReady() {},
		onLoad(options) {
			if (options.id) {
				this.webUrl =
					`https://www.judingxinfan.com/subscribe/#/?back=1&id=${options.id}&tokenType=${this.$storage.getItem('tokenType')}&token=${this.$storage.getItem('token')}&tenantId=${this.$storage.getItem('tenantId')}`
					console.log('this.webUrl',this.webUrl)
			}
		},
		methods: {
			handleMessage(e) {
				console.log('eee', e)
				this.$store.commit('setSubcribeImg', e.detail.data[0])
			}
		},
	}
</script>

<style lang="scss" scoped>
	.subscribe_container {
		padding-left: calc(var(--status-bar-height) + 10px);
	}
</style>